import { stringify } from 'qs';
import request from '@/utils/request';

//获取等级卡列表
export async function FindLevelCardList(params) {
    return request(`/${window.storeId}/Member/FindLevelCardList?${stringify(params)}`);
}

// 获取优惠券列表
export async function GetCouponList(params) {
    return request(`/${window.storeId}/Marketing/GetCouponList?${stringify(params)}`);
}

//积分分页
export async function GetPointListWithPage(params) {
    return request(`/${window.storeId}/Member/GetPointListWithPage?${stringify(params)}`);
}

//积分信息
export async function FindStorePoint(params) {
    return request(`/${window.storeId}/Member/FindStorePoint?${stringify(params)}`);
}

//ID获取数据
export async function FindLevelCardById(params) {
    return request(`/${window.storeId}/Member/FindLevelCardById?${stringify(params)}`);
}

//Id获取规则信息
export async function FindPointRule(params) {
    return request(`/${window.storeId}/Member/FindPointRule?${stringify(params)}`);
}

//获取等级
export async function FindLevelList(params) {
    return request(`/${window.storeId}/Member/FindLevelList?${stringify(params)}`);
}

//启用
export async function EnableLevelCard(params) {
  return request(`/${window.storeId}/Member/EnableLevelCard`, {
    method: 'POST',
    body: {
      ...params
    }
  });
}

// 设置积分规则
export async function SetStorePoint(params) {
    return request(`/${window.storeId}/Member/SetStorePoint`, {
      method: 'POST',
      body: {
        ...params
      }
    });
  }

  //新增规则
  export async function AddPointRule(params) {
    return request(`/${window.storeId}/Member/AddPointRule`, {
      method: 'POST',
      body: {
        ...params
      }
    });
  }

  //编辑规则
  export async function UpdatePointRule(params) {
    return request(`/${window.storeId}/Member/UpdatePointRule`, {
      method: 'POST',
      body: {
        ...params
      }
    });
  }


//禁用
export async function DisabledLevelCard(params) {
  return request(`/${window.storeId}/Member/DisabledLevelCard`, {
    method: 'POST',
    body: {
      ...params
    }
  });
}

//删除
export async function DelLevelCard(params) {
    return request(`/${window.storeId}/Member/DelLevelCard`, {
      method: 'POST',
      body: {
        ...params
      }
    });
  }

  //删除积分规则
  export async function DeleteStorePoint(params) {
    return request(`/${window.storeId}/Member/DeleteStorePoint`, {
      method: 'POST',
      body: {
        ...params
      }
    });
  }



// 新建
export async function AddLevelCard(params) {
    return request(`/${window.storeId}/Member/AddLevelCard`, {
      method: 'POST',
      body: {
        ...params
      }
    });
  }

  // 修改
export async function UpdateLevelCard(params) {
  return request(`/${window.storeId}/Member/UpdateLevelCard`, {
    method: 'POST',
    body: {
      ...params
    }
  });
}



